// Script for chaser enemies to try to collide with player hip

if( chase == 1 ) // Case to chase Player 1
{
    if( instance_exists( player1_ship ) ) // Checks if player 1 is alive
    {
        if( self.y > player1_ship.y ) // Checks to see if player 1 has dodged the enemy
            move_towards_point( player1_ship.x, room_height + 20, 4 ); // Sends enemy to leave screen

        else
            move_towards_point(player1_ship.x, player1_ship.y, 4);
    }
    else
        self.vspeed = 4;
}
        
        
if( chase == 0 ) // Case to chase Player 2
{
    if( instance_exists( player2_ship ) )
    {
        if( self.y > player2_ship.y ) // Checks to see if player 2 has dodged the enemy
        {
            move_towards_point( player2_ship.x, room_height + 20, 4 ); // Sends enemy to leave screen
        }
        else
        {
            move_towards_point(player2_ship.x, player2_ship.y, 4);
        }
    }
    else 
        self.vspeed = 4;
}
